<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../../base.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!--Enum数据字典，动态加载-->
<sys:genericTag4o id="_enumData" methodName="getEnumData"
       className="com.tmptSource.controller.taglib.A1EnumTag"/>
<sys:genericTag4o id="_enumColumnSelfData" methodName="getEnumColumnSelfData"
       className="com.tmptSource.controller.taglib.${classNameFirstWordUpper}Tag"/>

<#list columnList as column>
<#if column.dataResource?exists && column.dataResource==2>
<!--页面上查询列的值，动态加载，sql语句读数据库配置而来-->
<sys:genericTag4o id="_selectOptions4${column.propertyName}" methodName="select4${column.propertyName}"
       className="com.tmptSource.controller.taglib.${classNameFirstWordUpper}Tag"/>
</#if>
</#list>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
正在加载中，请稍等...
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>

    <title>查询</title>
    <link href="${path}/admin123/css/main.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="${path}/js/jquery/easyui1.5/themes/bootstrap/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="${path}/js/jquery/easyui1.5/themes/icon.css"/>
    <script type="text/javascript" src="${path}/js/jquery-1.8.0.min.js"></script>
    <script src="${path}/js/jquery/easyui1.5/jquery.easyui.min.js"></script>
    <script src="${path}/js/jquery/easyui1.5/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${path}/js/jquery.select.js"></script>
    <script type="text/javascript" src="${path}/js/myjs/myutils.js?random=<%=Math.random()%>"></script>

    <script type="text/javascript" src="data.js?random=<%=Math.random()%>"></script>
    <script src="${path}/js/jquery.iframeWin.js?random=<%=Math.random()%>"></script>
    <script type="text/javascript" src="../utils/my.js?random=<%=Math.random()%>"></script>
    <script type="text/javascript" src="../utils/condition.js?random=<%=Math.random()%>"></script>

    <style type="text/css">
        .west{width: 200px;padding: 3px;}
        .north{padding:3px;}
        .center{padding: 3px;}
        .form{margin:10px;}
        .form .text{width:350px;float:left; height:25px;border-bottom:1px solid #eee; display: block;}
        .form label{width:150px;float:left; border:1px solid #fff;}
        .clearboth{clear:both;	}
        .div_center{}
        #g .datagrid-btable tr{height: 30px;}
    </style>

</head>
<body class="easyui-layout" style="margin: 2px;" >


<div id="_conditionDiv" region="north" class="north" data-options="split:false,collapsed:false"><!-- ,minHeight:30 -->
    <%@ include file="condition.jsp" %>
</div>
<div region="center" id="g" class="center" >
    <table id="list" class="datagrid_table" width="100%" ></table>
    <!--
<s:form
    id="downloadReportForm"
    name="downloadReportForm"
    action="template_downloadReport.action?_keyRandom=%{#attr._keyRandom}"
    namespace="/admin123/template"
    theme="simple"
    target="_blank"/>
     -->
</div>
<#--<!-- 添加弹出框 添加 &ndash;&gt;
<div id="win" class="easyui-dialog" title="添加修改数据框"
	 <#if templateTable.width4AddDialog!=0>style="display: none;width:${templateTable.width4AddDialog}px;height:${templateTable.height4AddDialog}px"
	 <#else> style="display: none;width:800px;height:400px"
	 </#if>
     data-options="iconCls:'icon-save',modal:true,resizable:true"
     buttons="#dlg-buttons">
    <form id="form_add" method="post">
        <input type="hidden" id="${primaryKey}" name="${primaryKey}" />
        <div  class="form">
		<#list columnsTag.column4Add as item>
            <!-- 指定了宽度 &ndash;&gt;
            <div id="_${item.propertyName}_line"
                 class="text" <#if item.lineWidth4AddDialog!=0> style="width:${item.lineWidth4AddDialog}px;"</#if>>
                <script type="text/javascript">
                    //所有列备份一下，一会隐藏了，可以恢复（动态隐藏一些无关操作的列，每次onchange时，要先恢复显示所有列，再隐藏部分列；如：选择‘表名直接拼接SQL模板’时，隐藏一些无关的操作属性）
                    _columnDivArray[_columnDivArray.length] = '#_${item.propertyName}_line';
                </script>
                <label >${item.columnShowName}：</label>
                <div title="<#if item.columnTip??>${item.columnTip}</#if>">
				<#if item.columnType ? exists && item.columnType=='combotree'>
                    <select id="${item.propertyName}"  name="${item.propertyName}" class="easyui-combotree"
							<#if item.style4AddDialog ? exists && item.style4AddDialog!=''>style="${item.style4AddDialog}"
							<#elseif item.inputWidth4AddDialog!=0>style="width:${item.inputWidth4AddDialog}px;"
							<#else>style="width:150px;"
							</#if>
							<#if item.dataOptions4AddDialog ? exists && item.dataOptions4AddDialog!=''>data-options="url:'${item.optionsPage}',${item.dataOptions4AddDialog}"
							<#elseif item.required4AddDialog==0>data-options="url:'${item.optionsPage}',required:false"
							<#else>data-options="url:'${item.optionsPage}',required:true"
							</#if>/>
				<#elseif item.columnType ? exists && item.columnType=='combobox'>
                    <!-- check is select &ndash;&gt;
					<#list templateTableColumnOptionList as column>
						<#if column.propertyName?lower_case==item.propertyName?lower_case>
                            <!-- style, data-options &ndash;&gt;
                            <input class="easyui-combobox" name="${column.propertyName}" id="${column.propertyName}4Add"
							   <#if item.style4AddDialog ? exists && item.style4AddDialog!=''>style="${item.style4AddDialog}"
							   <#elseif item.inputWidth4AddDialog!=0>style="width:${item.inputWidth4AddDialog}px;"
							   <#else>style="width:150px;"
							   </#if>
							   <#if item.dataOptions4AddDialog ? exists && item.dataOptions4AddDialog!=''>data-options="valueField:'keyName', textField:'valueName',editable:false,${item.dataOptions4AddDialog}"
							   <#elseif item.required4AddDialog==0>data-options="valueField:'keyName', textField:'valueName',required:false,editable:false"
							   <#else>data-options="valueField:'keyName', textField:'valueName',required:true,editable:false"
							   </#if>/>
                            <script type="text/javascript">
								<#if column.dataResource?exists && column.dataResource==2>
								_columnCombobox4AddJsonArray[_columnCombobox4AddJsonArray.length] = '${r"${"}_selectOptions4${column.propertyName}.jsonStr4addDialog}';
								<#elseif column.dataResource?exists && (column.dataResource==1 || column.dataResource==4)>
                                _columnCombobox4AddJsonArray[_columnCombobox4AddJsonArray.length] = '${r"${"}_enumColumnSelfData.${column.propertyNameFirstWordUpper}4addDialog}';
								<#elseif column.dataResource?exists && column.dataResource==5>
                                _columnCombobox4AddJsonArray[_columnCombobox4AddJsonArray.length] = '${r"${"}_enumData.${column.propertyNameFirstWordUpper}4addDialog}';
								<#else>
								_columnCombobox4AddJsonArray[_columnCombobox4AddJsonArray.length] = '${column.a1TemplateColumnOptionJsonArray}';
								</#if>
                                _columnCombobox4AddArray[_columnCombobox4AddArray.length] = '${column.propertyName}4Add';
                            </script>
						</#if>
					</#list>
                <#elseif item.dataTransfer ? exists && (item.dataTransfer=='date' || item.dataTransfer=='datetime')>
                    <!-- 日期范围 &ndash;&gt;
                    <input type="text" id="${item.propertyName}" name="${item.propertyName}" size='20'
                        class='<#if item.dataTransfer=='date'>easyui-datebox<#else>easyui-datetimebox</#if>'
                        <#if item.style4AddDialog ? exists && item.style4AddDialog!=''>style="${item.style4AddDialog}"
                        <#elseif item.inputWidth4AddDialog!=0>style="width:${item.inputWidth4AddDialog}px;"
                        <#else>style="width:150px;"
                        </#if>
                        <#if item.dataOptions4AddDialog ? exists && item.dataOptions4AddDialog!=''>data-options="${item.dataOptions4AddDialog}"
                        <#elseif item.required4AddDialog==0>data-options="required:false"
                        <#else>data-options="required:true"
                        </#if>/>
                <#else>
                    <!-- Input &ndash;&gt;
                    <input class="easyui-validatebox"  type="text"  name="${item.propertyName}"
					   <#if item.style4AddDialog ? exists && item.style4AddDialog!=''>style="${item.style4AddDialog}"
					   <#elseif item.inputWidth4AddDialog!=0>style="width:${item.inputWidth4AddDialog}px;"
					   <#else>style="width:150px;"
					   </#if>
					   <#if item.dataOptions4AddDialog ? exists && item.dataOptions4AddDialog!=''>data-options="${item.dataOptions4AddDialog}"
					   <#elseif item.required4AddDialog==0>data-options="required:false"
					   <#else>data-options="required:true"
					   </#if>/>
				</#if>
                </div>
            </div>
		</#list>
            <div class="clearboth"></div>
        </div>
    </form>
</div>

<!-- 添加弹出框 Buttons &ndash;&gt;
<div id="dlg-buttons">
    <table cellpadding="0" cellspacing="0" style="width:100%">
        <tr>
            <td style="text-align:right">
                <a href="#" id="form_addButton" class="easyui-linkbutton" iconCls="icon-save">保存</a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#win').dialog('close')">关闭</a>
            </td>
        </tr>
    </table>
</div>-->


<!-- 右击菜单 -->
<div id="rightMenuDiv" class="easyui-menu" style="width:200px;">
    <!-- rightMenuItemClick('url','isDialog','width','height','itemName') -->
<#list rightMenuContext as mapRightMenu>
    <#--<sec:authorize url="${mapRightMenu.url}">-->
        <div onClick="rightMenuItemClickInner('${mapRightMenu.url}','${mapRightMenu.isDialog}','${mapRightMenu.width}','${mapRightMenu.height}','${mapRightMenu.itemName}')" data-options="iconCls:'icon-add'">
        ${mapRightMenu.itemName}
        </div>
    <#--</sec:authorize>-->
</#list>
</div>

<script type="text/javascript">
    function rightMenuItemClickInner(url,isDialog,width,height,itemName){
        rightMenuItemClickV2(url,isDialog,width,height,itemName,'提交',function(){
            window.frames['iframe_dialog'].formAddSubmitJustAdd();
        })
    }
</script>



<div id="win_common" class="easyui-dialog" iconCls="icon-add"/>

</body>
</html>




